<?xml version="1.0" encoding="UTF-8"?>
<definitions 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="testProcess" isExecutable="true">

    <startEvent id="theStart" />

    <sequenceFlow id="flow1"  sourceRef="theStart" targetRef="service" />

    <serviceTask id="service" camunda:expression="${execution.setVariable('behaviorInvoked', true)}" camunda:asyncAfter="true">

      <extensionElements>

          <camunda:executionListener
              event="start"
              expression="${execution.setVariable('listenerStartInvoked', true)}" />

          <camunda:executionListener
              event="end"
              expression="${execution.setVariable('listenerEndInvoked', true)}" />

        </extensionElements>

    </serviceTask>

    <sequenceFlow id="flow2" sourceRef="service" targetRef="taskAfterFlow2"/>

    <sequenceFlow id="flow3" sourceRef="service" targetRef="taskAfterFlow3"/>

    <receiveTask id="taskAfterFlow2" />

    <receiveTask id="taskAfterFlow3" />

  </process>

</definitions>
